package com.ibiaoke.boss.controller;

import com.ibiaoke.common.response.Res;
import com.ibiaoke.system.entity.AppVersions;
import com.ibiaoke.system.service.AppVersionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class AppVersionController {
    @Autowired
    private AppVersionService appVersionService;

    /**
     * 获取APK的版本号
     * @param type
     * @return
     */
    @RequestMapping("/getAppVersion")
    @ResponseBody
    public Res getAppVersion(String type) {
        List<AppVersions> version = appVersionService.getAppVersion(type);
        return Res.create().addResponse("version",version);
    }
}